package gamecenter.gc.service.Imp;

import gamecenter.gc.bean.Refund_Request;
import gamecenter.gc.mapper.Refund_Request_Mapper;
import gamecenter.gc.service.Refund_Request_Service;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class Refund_Request_Service_Imp implements Refund_Request_Service {
    @Resource
    private Refund_Request_Mapper refund_request_mapper;

    @Override
    public void add_Request(Refund_Request refund_request) {
        refund_request_mapper.add_Request(refund_request);
    }

    @Override
    public void del_Request(Refund_Request refund_request) {
        refund_request_mapper.del_Request(refund_request);
    }

    @Override
    public List<Refund_Request> get_all_Request() {
        return refund_request_mapper.get_all_Request();
    }

    @Override
    public Refund_Request get_Cer_Request(String user_game, String game_name) {
        return refund_request_mapper.get_Cer_Request(user_game, game_name);
    }

    @Override
    public boolean check_Request(String user_game, String game_name) {
        Refund_Request refund_request = refund_request_mapper.get_Cer_Request(user_game, game_name);
        return refund_request != null;
    }
}
